package com.wdc.n1;


import lombok.extern.slf4j.Slf4j;

import java.util.zip.Inflater;

@Slf4j(topic = "c.Test16")
public class Test16 {

    public static void main(String[] args) {
        Thread t1 = new Thread(() -> {
            try {
                log.debug("洗水壶");
                Thread.sleep(1000);
                log.info("烧开水");
                Thread.sleep(5000);
            } catch (InterruptedException e) {
                e.printStackTrace();

            }
        }, "老王");


        Thread t2 = new Thread(() -> {
            try {
                log.info("洗茶壶");
                Thread.sleep(1000);
                log.info("洗茶杯");
                Thread.sleep(1000);
                log.info("拿茶叶");
                Thread.sleep(1000);
                t1.join();

                log.info("泡茶");

            } catch (InterruptedException e) {
                e.printStackTrace();

            }
        }, "小王");

        t1.start();
        t2.start();


    }
}
